// 用来管理所有的请求接口

import service from "./request";

// 用户登录
export const Login = (username, password) => {
    return service({
        method: 'post',
        url: '/login',
        data: { username, password }
    })
}
// 获取菜单
export const Menues = () => {
    return service({
        method: 'get',
        url: '/menus'
    })
}
// 获取用户列表
export const Userslist = (params) => {
    return service({
        method: 'get',
        url: '/users',
        params
    })
}
// 添加用户列表
export const AddUser = (data) => {
    return service({
        method: 'post',
        url: '/users',
        data
    })
}
// 获取单个用户信息达到编辑回显
export const GetOneUser = (params) =>{
    return service({
        method: 'get',
        url: '/users/'+params
    })
}